<?php namespace App\Infra;

use App\Utils\ModelOperatorTrait;
use App\Models\Sundrie;
class SundrieManager{
	use ModelOperatorTrait;

	public function getSundries($conditions = null,$first = false,$union = []){
		return $this->findModel(Sundrie::class,Sundrie::query()->with($union),$conditions,$first);
	}

	public function updateSundrie($conditions = null,$data = null){
		$this->update(Sundrie::class,Sundrie::query(),$conditions,$data);
	}

	public function createSundrie($data){
		$this->create(Sundrie::class,$data);
	}

	public function deleteSundrie($conditions = null){
		$this->delete(Sundrie::class,Sundrie::query(),$conditions);
	}
}